package pl.edu.agh.inpema.core.model;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Message {

	public static final String FIELD_IP = "ip";
	public static final String FIELD_DATE = "date";
	public static final String FIELD_TEXT = "text";
	
	private int profileId;
	private Map<String, String> fieldsMap;
	
	public Message(int profileId) {
		this.profileId = profileId;
		this.fieldsMap = new HashMap<String, String>();
	}
	
	public int getProfileId() {
		return this.profileId;
	}
	
	public void setProfileId(int profileId) {
		this.profileId = profileId;
	}
	
	public String getField(String field) {
		return this.fieldsMap.get(field);
	}
	
	public void setField(String field, String fieldValue) {
		this.fieldsMap.put(field, fieldValue);
	}
	
	public boolean containsField(String field) {
		return this.fieldsMap.containsKey(field);
	}
	
	public Set<String> getFieldNames() {
		return this.fieldsMap.keySet();
	}
}
